using System;
using System.Collections.Generic;
using System.Text;

namespace Fuzzy
{
    /// <summary>
    /// An abstract class representing a fuzzy controller.
    /// </summary>
    public abstract class FuzzyController
    {
        protected List<FuzzyRule> fuzzyRules;

        /// <summary>
        /// Gets or sets the rules used by the fuzzy controller.
        /// </summary>
        public List<FuzzyRule> FuzzyRules
        {
            get { return fuzzyRules; }
            set { fuzzyRules = value; }
        }

        /// <summary>
        /// Creates a fuzzy controller.
        /// </summary>
        public FuzzyController()
        {
            fuzzyRules = new List<FuzzyRule>();
        }

        /// <summary>
        /// Calculates the output of the fuzzy controller.
        /// </summary>
        /// <param name="input">The input fuzzy sets.</param>
        /// <returns>The output fuzzy set.</returns>
        public abstract FuzzySet GetOutput(FuzzySet[] input);
    }
}
